package com.car.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.car.bean.PCAtuoBrand;
import com.car.util.ConnectionPool;

public class PCAuto {
	private Connection conn = ConnectionPool.getConnection("carvoice_core", "root", "zhouzhou100428",
			"carvoice.tpddns.cn");

	public void insertPCAutoBrand(PCAtuoBrand pb) {
		PreparedStatement ps = null;
		String sql = "INSERT INTO core_brand_pcauto(pcauto_id,pcauto_name,pcauto_sell_status,pcauto_car_field,pcauto_car_version,pcauto_tip) VALUES(?,?,?,?,?,?)";
		try {
			ps = conn.prepareStatement(sql);
			ps.setInt(1, pb.getPcauto_id());
			ps.setString(2, pb.getPcauto_name());
			ps.setInt(3, pb.getPcauto_sell_status());
			ps.setInt(4, pb.getPcauto_car_field());
			ps.setInt(5, pb.getPcauto_car_field());
			ps.setString(6, pb.getPcauto_tip());
			ps.executeUpdate();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
}
